package com.gscitysfy.cus.drain.modules.pipe.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gscitysfy.cloudfrmwk.assistant.domain.Result;
import com.gscitysfy.cus.drain.modules.pipe.entity.DrainPipeNetworkJob;
import com.gscitysfy.cus.drain.modules.pipe.entity.DrainPipeNetworkPage;
import com.gscitysfy.cus.drain.modules.pipe.entity.DrainPipeNetworkPlan;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gscitysfy.cus.drain.modules.pipe.vo.DrainPipeNetworkPlanVo;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;

/**
 * @author admin
 * @since 2022-11-15 10:49:35
 */
public interface IDrainPipeNetworkPlanService extends IService<DrainPipeNetworkPlan> {

    /**
     * 根据，删除检测计划
     * @param ids
     * @return
     */
    Result<Boolean> del(String ids);

    /**
     * 审核检测计划
     * @param plan
     * @return
     */
    Result<Boolean> audit(DrainPipeNetworkPlan plan);

    /**
     * 项目新增接口
     * @param plan
     * @return
     */
    Result<Boolean> andOrUpdate(DrainPipeNetworkPlan plan);

    /**
     * 获取
     * @param plan
     * @return
     */
    Result<List<DrainPipeNetworkPage>> findPip(DrainPipeNetworkPlan plan);

    /**
     *  获取监测计划列表
     * @param page
     * @param plan
     * @return
     */
    Result<IPage<DrainPipeNetworkPlan>> findPlanList(Page<DrainPipeNetworkPlan> page,  DrainPipeNetworkPlan plan);

    /**
     *  导出检测计划
     * @param response
     * @param plan
     * @throws IOException
     */
    void export(HttpServletResponse response, DrainPipeNetworkPlan plan) throws IOException;

    /**
     * 巡检爱
     * @param cmKid
     * @return
     */
    Result<DrainPipeNetworkPlan> view(Long cmKid);

    /**
     * 派发任务
     * @param job
     * @return
     */
    Result<Boolean> createJob(DrainPipeNetworkJob job);

    /**
     *  查看覆盖率
     * @param ids
     * @return
     */
    Result<String> viewCoverage(String ids);

    /**
     * 根据guid查看管道信息
     * @param guid
     * @return
     */
    Result<DrainPipeNetworkPage> pipInfo(String guid);
}
